package com.feng.study.demo;

import lombok.extern.slf4j.Slf4j;

import java.util.ArrayList;

/**
 * @Author: Zeng ShaoYong
 * @Date: 2021-11-11
 * @Description:
 */
@Slf4j
public class Test extends ClassLoader{
    public static void main(String[] args) {
        classLoaderDemo();

//        int[] reward1 = {1, 1, 3, 4};
//        int[] reward2 = {4, 4, 1, 1};
//        System.out.println(miceAndCheese(reward1, reward2, 2));
    }


    public static void classLoaderDemo(){
        ClassLoader classLoader = Test.class.getClassLoader();
        System.out.println(classLoader);
        ClassLoader parent = classLoader.getParent();
        System.out.println(parent);
        ClassLoader parent1 = parent.getParent();
        System.out.println(parent1);
        System.out.println();
    }

    public static int miceAndCheese(int[] reward1, int[] reward2, int k) {
        ArrayList<Integer> list = new ArrayList<>();
        for (int i : reward1) {
            list.add(reward1[i]-reward2[i]);
        }


        return 0;
    }
}
